/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DAO;


import AO.Experience;
import dbconnector.DBDriver;
import java.sql.PreparedStatement;
/**
 *
 * @author HONEY
 */
public class ExperienceDAO
{
     public static boolean save(Experience e) 
  {
    try
    {
        
           
      PreparedStatement pstmt = DBDriver.getPrepare("insert into experiancedetails values(?,?,?,?,?,?)");
      pstmt.setString(1, e.getUsername());
      pstmt.setString(2, e.getExperience());
      pstmt.setString(3, e.getCompany());
      pstmt.setString(4, e.getDesignation());
      pstmt.setString(5, e.getSalary());
      pstmt.setString(6, e.getCompanyaddress());
      
      int i=pstmt.executeUpdate();
      if(i==1)
          return true;
    }
    catch (Exception ex)
    {ex.printStackTrace();
        return false;
    }
    return false;
  }
     
    
}
